/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package de.jonasjelten.jcalc.exception;

import de.jonasjelten.jcalc.parser.JExpressionParser;

/**
 *
 * @author michael
 */
public class JExpressionParserRegistrationAliasConflictException extends JExpressionParserException {

    /**
     * Creates a new instance of <code>JExpressionParserRegistrationAliasConflictException</code> without detail message.
     */
    public JExpressionParserRegistrationAliasConflictException() {
        super("Exception while registering JExpressionParser to JParser: Alias conflict.");
    }

    /**
     * Constructs an instance of <code>JExpressionParserRegistrationAliasConflictException</code> with the specified detail message.
     * @param msg the detail message.
     */
    public JExpressionParserRegistrationAliasConflictException(String msg) {
        super(msg);
    }

    public JExpressionParserRegistrationAliasConflictException(String alias, JExpressionParser newJExpressionParser, JExpressionParser oldJExpressionParser) {
        super("Exception while registering JExpressionParser \"" + newJExpressionParser + "\" to JParser: Alias \"" + alias + "\" is already in use by JExpressionParser \"" + oldJExpressionParser + "\".");
    }
}
